package com.lowkey.proxy;

import java.io.Serializable;

import net.sf.cglib.proxy.Enhancer;

import com.lowkey.sqlTools.LowkeyDetachedCriteria;

public class SessionImpl implements Session {

	@Override
	public Object load(Class c, Serializable id) {
		LazyInitializer lazy  = new CGLIBLazyInitializerImpl();
		lazy.load(c, id);
		Enhancer enhancer = new Enhancer();
		enhancer.setSuperclass(c);
		enhancer.setCallback(lazy);
		return enhancer.create();
	}
	@Override
	public Object load(Class c, LowkeyDetachedCriteria deta) {
		return null;
	}
	
	@Override
	public Object load(Class c, String condtion) {
		return null;
	}

}
